package ds.impl;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import us.IListUs;
import ds.IListDS;
import entities.Item;
import entities.ItemList;
import entities.User;

@Transactional
public class ListDS implements IListDS {

	private IListUs listUs;

	public List<ItemList> getAllLists(User user) {
		return listUs.getAllLists(user);
	}

	public void addItem(ItemList list, Item item) {
		listUs.addItem(list, item);
	}

	public void removeItem(ItemList list, int itemId) {
		listUs.removeItem(list, itemId);
	}

	public void cleanList(ItemList list) {
		listUs.cleanList(list);
	}

	public IListUs getListUs() {
		return listUs;
	}

	public void setListUs(IListUs listUs) {
		this.listUs = listUs;
	}

	@Override
	public ItemList find(int idList) {
		return this.listUs.find(idList);
	}

	@Override
	public void addList(User user, ItemList list) {
		this.listUs.addList(user, list);
		
	}

	@Override
	public void removeList(User user, ItemList list) {
		this.listUs.removeList(user, list);
		
	}

	@Override
	public void checkItem(int itemId) {
		listUs.checkItem(itemId);
		
	}



}